//---------------------------------------------------------------------------

#ifndef CRichEditH
#define CRichEditH
//---------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Forms.hpp>
#include "RichEdit2.hpp" // Pour TRichEdit2
#include "RichEditOle.h"    //Pour TIRichEditOle
//---------------------------------------------------------------------------
class CRichEdit;
extern PACKAGE void __fastcall ConvertirTexteSimpleVersRichEdit(const AnsiString &aTexte, TRichEdit2 *RichEdit);

class TIRichEditOle;
class PACKAGE CRichEdit : public TRichEdit2
{
private:
  TIRichEditOle *m_Ole;
  TWndMethod m_SveWindowProc;

  void   __fastcall SetEnabled(     bool              bEnabled  );
  bool   __fastcall GetEnabled();
  void   __fastcall SetReadOnly(    bool              bReadOnly );
  bool   __fastcall GetReadOnly();

protected:

public:
  void __fastcall MyWndProc(Messages::TMessage &Message);

   __fastcall CRichEdit(TComponent* Owner);
   __fastcall ~CRichEdit();

__published:
  __property bool Enabled     = { read = GetEnabled   , write = SetEnabled    , default = true };
  __property bool ReadOnly    = { read = GetReadOnly  , write = SetReadOnly   , default = false};
};
//---------------------------------------------------------------------------
#endif
 
